{{ $link := .Get "link" }}
{{ $showSummary := .Get "showSummary" }}
{{ $compactSummary := .Get "compactSummary" | default false }}
{{ $target := .Page }}
{{ if ne $link .Page.RelPermalink }}
  {{ $target = index (first 1 (where .Site.AllPages "RelPermalink" $link)) 0 }}
{{ end }}
{{ if $target }}
  <section class="space-y-10 w-full">
    {{ $context := dict "target" $target "showSummary" $showSummary "compactSummary" $compactSummary }}
    {{ partial "article-link/_shortcode.html" $context }}
  </section>
{{ end }}
